#!/bin/bash

get_latest_release() {
   VERSION=$(curl --silent "https://gitee.com/api/v5/repos/Suwingser/MCSManager/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed -n 's/^.*v/v/p') 
}

# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4